<?php
	if(isset( $_POST["submit"])){
	//header("Location: http://localhost/assiss/newEmployee.php");
		$user = $_POST["username"];
		$pass = $_POST["password"];				
		setcookie("un", $user, time() + 1000*60 );
		setcookie("pw",$pass, time() + 1000*60 );
	}
	// if(!isset( $_POST["submit"] )){
		// setcookie("un", $user, time()-1);
		// setcookie("pw", $pass, time()-1);
	// }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Open-Air by FCT</title>
<link href="http://fonts.googleapis.com/css?family=Oswald:400,300" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

<style>
#colorlogin{
 color : white;
}
bodsdfsdfy{
	margin-left: 50px;
	margin-right: 50px;
}
#wellcome{
	margin-left: 200px;
	color: white;
	font-size: 20px;
}
</style>
</head>
<body>

<div id="wrapper">
	<div id="menu-wrapper">
		<div id="menu" class="container">
			<ul>
				<li class="current_page_item"><a href="/assiss/issassignment.php">Homepage</a></li>
				<li><a href="/assiss/newEmployee.php">newEmployee</a></li>
				<li><a href="/assiss/lookingfor.php">LookingInfor</a></li>
				<li><a href="/assiss/ass_update1.php">update</a></li>
				<li><a href="/assiss/loginissassignment.php">logout</a></li>
				<li id= "wellcome">     <?php
				if($_COOKIE["un"]) $wellcom = $_COOKIE["un"]; else $wellcom = $_POST["username"];
				print "WELLCOME"."  &nbsp;&nbsp; "." $wellcom !"; ?> </li>
			</ul>
		</div>
	</div>
	<div id="header">
			<div id="content">
			<div id="userinfo">

		<div id="colorlogin"><?php
			if(isset( $_POST["submit"])){
	//			header("Location: http://localhost/assiss/newEmployee.php");
				$user = $_POST["username"];
				$pass = $_POST["password"];
				
		//		setcookie("user", $user, time() + 30*60);
				$c= oci_connect($user, $pass, "orcl");
				$s = oci_parse($c, 'select * from iss.nhan_vien');
				oci_execute($s);
				$showLookingfor = false;
				if($showLookingfor){
					print '<table border="1">';
					print'<tr>'; print'<td>Thong tin ban can tim: </td>'; print'</tr>';
					print'<tr>';
						print'<td>HO</td>';
						print'<td>TEN</td>';
						print'<td>MA_NV</td>';
						print'<td>NGAY_SINH</td>';
						print'<td>EMAIL</td>';
						print'<td>MS_THUE</td>';
						print'<td>LUONG</td>';
						print'<td>MA_TP</td>';
						print'<td>MA_PB</td>';
					print'</tr>';
					while ($row = oci_fetch_array($s, OCI_NUM+OCI_RETURN_NULLS)) {
						print '<tr>';
						foreach ($row as $item)
						print '<td>'.htmlentities($item).'</td>';
						print '</tr>';
					}
					print '</table>';
				}
				oci_free_statement($s);
			}
		?></div></div>
		<div id="logo" class="container">
			<h1><a href="#">Open-Air</a></h1>
			<p>INFORMATION SYSTEM SECURITY</p>
		</div>
	</div>
	<div id="page" class="container">


				<h2><a href="#">Welcome to Open-Air </a></h2>
				<div class="entry">
					<p><img src="images/img11.jpg" width="690" height="200" alt="" /></p>
								</div>
		</div>

	</div>
	<!-- end #page -->
	<div id="four-column" class="container">
		<div id="tbox1">
			<div class="box-style">
				<div class="image"></div>
				<div class="arrow"></div>
				<div class="content">
					<h2>Fusce ultrices fringilla</h2>
					<p>Aliquam erat volutpat. Quisque dictum. Integer nisl risus, sagittis convallis elementum congue, nibh. </p>
				</div>
			</div>
		</div>
		<div id="tbox2">
			<div class="box-style">
				<div class="image"></div>
				<div class="arrow"></div>
				<div class="content">
					<h2>Mauris vulputate dolor</h2>
					<p>Pellentesque tristique ante ut risus. Quisque dictum. Integer nisl risus, sagittis convallis,   congue, nibh. </p>
				</div>
			</div>
		</div>
		<div id="tbox3">
			<div class="box-style">
				<div class="image"></div>
				<div class="arrow"></div>
				<div class="content">
					<h2>Nulla luctus eleifend </h2>
					<p>Pellentesque tristique ante ut risus. Quisque dictum. Integer nisl risus, sagittis  elementum congue, nibh.</p>
				</div>
			</div>
		</div>
		<div id="tbox4">
			<div class="box-style">
				<div class="image"></div>
				<div class="arrow"></div>
				<div class="content">
					<h2>Nulla luctus eleifend </h2>
					<p>Pellentesque tristique ante ut risus. Quisque dictum. Integer nisl risus, sagittis  elementum congue, nibh.</p>
				</div>
			</div>
		</div>
	</div>
</div>
<div id="footer-content" class="container">
	<div id="footer-bg">
		<div id="column1">
			<h2>HoChiMinhCity.</h2>
			<p>Copyright issassignment.com</p>
			<p>All rights reserved.</p>
			<p>Design by <a href="http://localhost/assiss/issassignment.php">TRUNGHIEU</a>. Photos by <a href="http://localhost/assiss/issassignment.php">TRUNGHIEU</a>.</p>
		</div>
		<div id="column2">
			<h2>Rhoncus volutpat</h2>
			<ul class="list-style3">
				<li class="first"><a href="#">Pellentesque consectetuer gravida blandit.</a></li>
				<li><a href="#">Lorem consectetuer adipiscing elit.</a></li>
				<li><a href="#">Phasellus pellentesque conguen lectus</a></li>

			</ul>
		</div>
		<div id="column3">
			<h2>Recommended Links</h2>
			<ul class="list-style3">
				<li class="first"><a href="#">Pellentesque consectetuer gravida blandit.</a></li>
				<li><a href="#">Lorem consectetuer adipiscing elit.</a></li>
				<li><a href="#">Phasellus pellentesque conguen lectus</a></li>

			</ul>
		</div>
		<div id="column4">
			<h2>Social</h2>
			<ul class="list-style3">
				<li class="first"><a href="#">Twitter</a></li>
				<li><a href="#">Facebook</a></li>
				<li><a href="#">Flickr</a></li>

			</ul>
		</div>
	</div>
</div>
<!-- end #footer -->
</body>
</html>
